## -*- coding: utf-8 -*-

<%def name="show(entry, link_title=False)">
  <%
    from google.appengine.api import users
    user = users.get_current_user()
  %>
  <div class="entry">
  % if link_title:  
    <h2>${ h.link_to(entry.title, h.url(action='show', id=entry.key().id())) }</h2>
    % if users.is_current_user_admin():
      <span class="edit">${ h.link_to(u"編集", h.url(action='edit', id=entry.key().id())) }</span>
    % endif
  % else:
    <h2>${ entry.title }</h2>
    % if users.is_current_user_admin():
      <span class="edit">${ h.link_to(u"編集", h.url(action='edit', id=entry.key().id())) }</span>
    % endif
  % endif
    <div>${ entry.pub_date } posted by ${ entry.creator }</div>
    <p>${ entry.content|h }</p>
  </div>
</%def>
